package team.tunan.controller;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;
import team.tunan.common.Result;
import team.tunan.dto.StockinDto;
import team.tunan.dto.StockinPageDto;
import team.tunan.entity.Stockin;
import team.tunan.service.IStockinService;

/**
 * <p>
 * 进货表 前端控制器
 * </p>
 *
 * @author sqx
 * @since 2023-12-24
 */
@RestController
@RequestMapping("/stockin")
public class StockinController {
    @Autowired
    private IStockinService iStockinService;

    @PostMapping("/insertStockin")
    public Result insertStockin(@RequestBody Stockin stockin){
        return Result.success(iStockinService.insertStockin(stockin));
    }

    @PostMapping("/selectPage")
    public Result<Page<StockinDto>> selectPage(@RequestBody StockinPageDto stockinPageDto){
        return Result.success(iStockinService.selectPage(stockinPageDto));

    }




}

